Skip to content

Conversation

@ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Jan 1, 2025

Checklist

Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.

  • Please read Contributing to QuantumToolbox.jl.
  • Any code changes were done in a way that does not break public API.
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.
  • (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

Summary of this PR:

New structures:

  • AbstractSpace
  • Space
  • AbstractDimensions
  • Dimensions
  • GeneralDimensions

New field

  • dimensions (originally called dims) for Qobj / QobjEvo / TimeEvolutionProblem / EigsolveResult

New property

  • dims for Qobj / QobjEvo / TimeEvolutionProblem / EigsolveResult

New internal functions:

  • get_dimensions_to
  • get_dimensions_from
  • dimensions_to_dims: transform AbstractDimensions to integer-vector
  • _get_dims_string: to get the dims string for printing

Changed internal functions:

  • _check_dims -> _gen_dimensions. This was the one to check the format of user specified dims, now it also checks the format and generates the Dimensions structure.
  • check_dims -> check_dimensions. This was the one to check if the two Qobj have the same dims, now it allows multiple input Qobj and check whether all Qobj.dimensions are equal).

Related issues or PRs

close #271
close #353

@ytdHuang ytdHuang marked this pull request as ready for review January 7, 2025 08:12
@ytdHuang ytdHuang changed the title Introduce Space, Dimensions, and CompoundDimensions Introduce Space, Dimensions, and GeneralDimensions Jan 7, 2025
@ytdHuang ytdHuang removed the request for review from albertomercurio January 8, 2025 07:04
@ytdHuang ytdHuang marked this pull request as draft January 8, 2025 07:04
@ytdHuang ytdHuang marked this pull request as ready for review January 8, 2025 07:18
Copy link
Member

@albertomercurio albertomercurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from these minor comments. Everything is good. However, you kept the previous commits changes of other PRs, here. Could you rebase to only include the changes of this PR?

@albertomercurio
Copy link
Member

Ok, looking at all the commits changes, everything is fine.

@albertomercurio albertomercurio merged commit 4f81980 into main Jan 13, 2025
17 of 18 checks passed
@ytdHuang ytdHuang deleted the dev/dimensions branch January 13, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Space and Dimensions structure to align with QuTiP Support type = Composed quantum objects

3 participants